package com.fortune.rainshine.feign.service;

import com.fortune.rainshine.config.FeignConfig;
import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.base.PagingListResult;
import com.fortune.rainshinecommon.base.ParmsModel;
import com.fortune.rainshinecommon.entity.ShopEntity;
import com.fortune.rainshinecommon.model.ShopModel;
import com.fortune.rainshinecommon.model.system.User;
import com.fortune.rainshinecommon.query.ShopQuery;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@FeignClient(value = "rain-shine-service",configuration = FeignConfig.class)
@Controller
public interface ShopFeign {
    @PostMapping("/shop/createShop")
    @ResponseBody
    MsgModel createShop(@RequestBody ShopModel shopModel);

    @PostMapping("/shop/updateShop")
    @ResponseBody
    MsgModel updateShop(@RequestBody ShopModel shopModel);

    @PostMapping("/shop/shopList")
    @ResponseBody
    PagingListResult<ShopEntity> shopList(@RequestBody ShopQuery query);

    @PostMapping("/shop/delShop")
    @ResponseBody
    MsgModel delShop(@RequestBody ShopModel shopModel);

    @PostMapping("/shop/stopShop")
    @ResponseBody
    MsgModel stopShop(@RequestBody ShopModel shopModel);

    @PostMapping("/shop/shopsByUserId")
    @ResponseBody
    List<ShopModel> getShopsByUserId(@RequestBody Integer userId);

    @PostMapping("/shop/getShopInfoById")
    @ResponseBody
    MsgModel getShopInfoById(@RequestBody ShopQuery query);

    @PostMapping("/shop/appGetUserShopList")
    @ResponseBody
    MsgModel appGetUserShopList(@RequestBody ShopQuery query);

    @PostMapping("/shop/getShopByShopId")
    @ResponseBody
    ShopModel getShopByShopId(@RequestBody Integer shopId);

    @PostMapping("/shop/getServiceRecordShops")
    MsgModel getServiceRecordShops(@RequestBody ParmsModel parm);

    @PostMapping("/shop/getShopsByMerchants")
    @ResponseBody
    MsgModel getShopsByMerchants(@RequestBody  ParmsModel parm);

    @PostMapping("/shop/getAllLevel3Shops")
    @ResponseBody
    MsgModel getAllLevel3Shops(@RequestBody ParmsModel parm);

    @PostMapping("/shop/getAllUsersByShopId")
    @ResponseBody
    List<User> getAllUsersByShopId(@RequestBody Integer shopId);

    @PostMapping("/shop/shopsByUserId2")
    @ResponseBody
    List<ShopModel> getShopsByUserId2(@RequestBody Integer userId);

    @PostMapping("/shop/getShopByShopId2")
    ShopModel getShopByShopId2(@RequestBody Integer shopId);
}
